1. Field of the Invention
The present invention relates to a resolution-free image representation technique for converting an object in a raster image into gradient meshes by approximating the object by adjusting the positions, gradients, and colors of the meshes so as to reduce color errors between the meshes and the object.
2. Description of the Related Art
A method of approximating the contour of an object by a function such as a Bezier function or a spline function has been conventionally used for resolution-free representation of illustrations and texts. This method is a commonly used high-speed representation method but is poor for complex gradation representations.
A gradient mesh tool in Adobe Illustrator® is generally used to draw an object containing a complex gradation by resolution-free representation. The gradient mesh method can be used to draw a complex object by generating a cubic function by adding colors and gradients to meshes (patent references 1 and 2).
For a resolution-free representation of an object containing a complex gradation, some proposed methods approximate an image by meshes. An example of these methods is a method using triangular patches (patent reference 3) to approximate an image, and a method to reduce approximation errors by dividing Bezier patches into individual small areas (non-patent reference 1). Another proposed method realizes a resolution-free representation using a relatively small number of meshes that is achieved through constructing gradient meshes by solving an optimization problem (patent reference 4 and non-patent reference 2).    [Patent Reference 1] Japanese Patent Laid-Open No. 11-345347    [Patent Reference 2] Japanese Patent Laid-Open No. 10-320585    [Patent Reference 3] Japanese Patent Registration No. 03764765    [Patent Reference 4] U.S. Pre-Grant Publication No. 2008/0278479    [Non-patent Reference 1] Brian Price, William Barrett, “Object-based vectorization for interactive image editing”, In proceedings of Pacific Graphics 2006, 2006, vol. 22, Nos. 9-11, pp. 661-670.    [Non-patent Reference 2] Jian Sun, Lin Liang, Fang Wen, Heung-Yeung Shum, “Image Vectorization using Optimized Gradient Meshes”, In proceedings of SIGGRAPH 2007, 2007, vol. 26, No. 3.
The above-mentioned method of approximating an image using triangular patches poses a problem associated with object boundary representation. When the object boundary has a smooth curve, it is difficult to faithfully approximate this curve by linear meshes, so a large number of meshes must be used to faithfully approximate this curve. High-order meshes need to be used to approximate a complex boundary by a smaller number of meshes.
Since the above-mentioned method of reducing approximation errors by dividing Bezier patches into individual small areas uses high-order meshes, it can faithfully approximate the object boundary. However, this method divides meshes into individual small areas in order to reduce approximation errors, so it requires a relatively large number of meshes and, in turn, requires a relatively large amount of data to approximate a portion where a change in color of the object is complex.
The above-mentioned methods of constructing gradient meshes by solving an optimization problem and calculating an evaluation function for each triangular patch can realize a resolution-free representation by a smaller number of meshes in both the object boundary and a portion where a change in color of the object is complex. However, if a vertex of a gradient mesh is located in a pixel that has an intermediate color between the colors of the object and the background and is generated at the object boundary upon processing such as anti-aliasing, the adverse influence of the intermediate color spreads into the mesh. This poses a problem that meshes cannot be generated with sufficient approximation accuracy.